define(function(require) {

  var Backbone = require('backbone');
  var _ = require('underscore');
  var PageView = require('./PageView');

  return PageView.extend({

    type: 'SlidePageView',

    className: function() { return "PageView SlidePageView"},

    render: function(){
      var _this = this;
      PageView.prototype.render.apply(this, arguments);
      var transition_options = this.options.transition;
      var pageWidth = (transition_options && transition_options.stretch) ||"100%";
      var windowWidth = window.innerWidth;
      var pageWidth_int = parseInt(pageWidth);
      var pxWidth = windowWidth;
      if(!isNaN(pageWidth_int)){
        var pageWidth_str = pageWidth_int.toString();
        var lendiff = pageWidth.length - pageWidth_str.length;
        if(lendiff==1 ){
          //为百分比
          pxWidth = windowWidth*pageWidth_int/100;
        }else if(lendiff==2){
          pxWidth = pageWidth_int;
        }else{

        }
      }
      if(transition_options && ( transition_options.type == "rightOut" || transition_options.type == "leftOut")){
        this.$el.css({"width":pxWidth+"px"});
      }

      return this;
    }
  });
});
